home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / try_qb / check.bas (.txt) < prev    next >
QuickBASIC Tokenized Source  |  1989-12-04  |  2KB  |  28 lines

  1. Amount
  2. FALSE
  3. Balance
  4. TransacNum
  5. Limit
  6. Swaps
  7.  Get account's starting balance:
  8. Type starting balance, then press <ENTER>: "
  9.  Get transactions. Continue accepting input until the
  10.  input is zero for a transaction, or until 100
  11.  transactions have been entered:
  12. ) Enter transaction amount (0 to end): "
  13.  Sort transactions in ascending order,
  14.  using a "bubble sort":s
  15.  If two adjacent elements are out of order, switch
  16.  those elements:
  17.  Sort on next pass only to where the last switch was made:
  18.  Sort until no elements are exchanged:
  19.  Print the sorted transaction array. If a transactionm
  20.  is greater than zero, print it as a "CREDIT"; if ao
  21.  transaction is less than zero, print it as a "DEBIT":
  22. CREDIT: $$#####.##
  23. DEBIT:  $$#####.##
  24.  Update balance:
  25.  Print the final balance:
  26. --------------------------
  27. Final Total: $$######.##
  28.